package com.skiving.cloud.auth.serverclient;

import com.skiving.cloud.auth.config.ClientFeignConfiguration;
import com.skiving.cloud.auth.entity.UserQueryParameter;
import com.skiving.cloud.common.utils.ReturnT;
import feign.RequestLine;
import feign.solon.FeignClient;
import org.noear.solon.annotation.Body;
import org.noear.solon.annotation.Path;

import java.util.List;

@FeignClient(name = "admin", group = "DEFAULT_GROUP", path = "/sysUser/", fallback = ClientSysUserServiceFallback.class, configuration = ClientFeignConfiguration.class)
public interface ClientSysUserService {
    /**
     * 根据岗位ID和用户ID查询用户姓名
     * @param parameter 参数
     * @return 逗号隔开的用户姓名
     */
    @RequestLine("POST getUserNameByStationIdsAndUserIds")
    ReturnT<String> getUserNameByStationIdsAndUserIds(@Body UserQueryParameter parameter);

    /**
     * 根据用户ID获取岗位集合
     * @param userId 用户ID
     * @return 结果
     */
    @RequestLine("GET getStationIdListByUserId/{userId}")
    List<String> getStationIdListByUserId(@Path("userId") String userId);
}
